package cc.wfu.types.exception;

import lombok.Data;
import lombok.EqualsAndHashCode;
/**
 * 自定义异常
 */
public class AppException extends RuntimeException {

    /**
     * 异常码
     */
    private String code;

    /**
     * 异常信息
     */
    private String message;

    public AppException(String message) {
        super(message);
        this.message = message;
    }

    public AppException(String code, Throwable cause) {
        this.code = code;
        super.initCause(cause);
    }

    public AppException(String code, String message) {
        super(message);
        this.code = code;
        this.message = message;
    }

    public AppException(String code, String message, Throwable cause) {
        super(message);
        this.code = code;
        this.message = message;
        super.initCause(cause);
    }
}